﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Globalization;

namespace Dal
{
	public class DataGroup : IDisposable
	{
		private DataTable myDT = new DataTable();
		private int countRow = 0;
		private int countPage = 0;

		public DataGroup(DataTable tmpDT, int tmpRow, int tmpPage)
		{
			myDT.Locale = CultureInfo.InvariantCulture;
			myDT = tmpDT;
			countRow = tmpRow;
			countPage = tmpPage;
        }

		public DataTable DT
        {
			get { return myDT; }
        }
		public int Row
		{
			get { return countRow; }
		}
		public int Page
		{
			get { return countPage; }
		}
		protected virtual void Dispose(bool disposing)
		{
			if (disposing)
			{
				myDT.Dispose();
				countRow = 0;
				countPage = 0;
			}
		}
		public void Dispose()
		{
			Dispose(true);
			GC.SuppressFinalize(this);
		}
	}
}
